package com.example.model;

//订单

import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

@Data
@TableName("boot_order")
public class Order extends Model<Order> implements Serializable {
    private static final long serialVersionUID = 2603890837103787306L;
    @TableId
    private Long oid;//订单id

    //用户
    private Integer uid;//用户id
    private String username;//用户名

    //商品
    private Integer pid;//商品id
    private String pname;//商品名称
    private Double pprice;//商品单价

    //数量
    private Integer number;//购买数量
    @Override
    protected Serializable pkVal() {
        // TODO Auto-generated method stub
        return this.oid;
    }
}

